package org.sixtythousand.joker;

import org.sixtythousand.joker.util.LifeCycle;

import java.util.Collection;
import java.util.List;
import java.util.concurrent.Executor;

/**
 * 负责处理连接和请求的抽象接口
 * @author zhoulk
 * @date 2023/10/11 10:06
 * @desc
 */
public interface Connector extends LifeCycle {

    Server getServer();

    Executor getExecutor();

    void addConnectionFactory(String protocol, AbstractConnectionFactory connectorFactory);

    ConnectionFactory getConnectionFactory(String protocol);

    Collection<ConnectionFactory> getConnectionFactories();

    List<String> getProtocols();
}
